type Last<T> = T extends [...any[], infer R] ? R : T;

type L1 = Last<[2]>;
type L2 = Last<[]>;
